package com.fept.msgcore.repository.serviceImpl;

import com.fept.msgcore.repository.mapper.DeviceMapper;
import com.fept.msgcore.repository.pojo.Device;
import com.fept.msgcore.repository.service.IDeviceService;
import com.fept.msgcore.repository.unit.Page;
import org.omg.CORBA.PUBLIC_MEMBER;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Srma on 2/10/2017.
 */

@Service("deviceService")
public class DeviceServiceImpl implements IDeviceService {

    public static IDeviceService instance;

    @Autowired
    private DeviceMapper deviceMapper;


    public DeviceServiceImpl()
    {
        instance = this;
    }

    public static IDeviceService getInstance()
    {
        return instance;
    }

    public Device findByDeviceNo(String deviceNo)
    {
        return deviceMapper.findByDeviceNo(deviceNo);
    }

    public List<Device> selectByPage(Page page)
    {
        return deviceMapper.selectByPage(page);
    }
}
